﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //string Username = Request.Form["username"];
            //string Password = Request.Form["password"];
            //Response.Write($"<h>欢迎你，{Username}，你的密码是：{Password}</h><br/>");

            string Username1 = Request.Params["username"];
            string Password1 = Request.Params["password"];
            Response.Write($"<h>欢迎你，{Username1}，你的密码是：{Password1}</h><br/>");//Get

            string Username2 = Request.QueryString[""];//填url路径名
            string Password2 = Request.QueryString[""];//填url路径名
            Response.Write($"<h>欢迎你，{Username2}，你的密码是：{Password2}</h><br/>");//Post

            Response.Redirect("");
            //if (PreviousPage != null)
            //{
            //    string Username3 = "";
            //    string Password3 = "";
            //    TextBox namebox = (TextBox)PreviousPage.FindControl("username");
            //    TextBox passwordbox = (TextBox)PreviousPage.FindControl("password");
            //    if (Username3 != null)
            //    {
            //        Response.Write("Username3.Text");
            //    }
            //    else if (Password3 != null)
            //    {
            //        Response.Write("Password3.Text");
            //    }
            //}
        }
    }
}